# $Id: PKGBUILD 83642 2013-02-04 09:34:09Z arodseth $
# Maintainer: Alexander Rødseth <rodseth@gmail.com>
# Contributor: Daniel J Griffiths <ghost1227@archlinux.us>
# Contributor: Jaroslav Lichtblau <dragonlord@aur.archlinux.org>
# Contributor: Jeff Mickey <j@codemac.net>
# Contributor: Dusty Phillips <dusty@buchuki.com>

pkgname=jedit
pkgver=5.0.0
pkgrel=2
pkgdesc='Text editor for programmers'
arch=('any')
url='http://www.jedit.org/'
license=('GPL')
depends=('sh' 'java-runtime' 'desktop-file-utils')
makedepends=('gendesk')
optdepends=('java-environment: for java development')
install=$pkgname.install
noextract=("${pkgname}${pkgver}install.jar")
source=("http://downloads.sourceforge.net/$pkgname/${pkgname}${pkgver}install.jar"
        'jedit.sh'
        'jeditbg.sh'
        'jedit.props')
sha256sums=('24b7f10f012737d77fe4bfa6c7961fca978ad3dd410561efd1ca8ab796e0f6ad'
            'e908f2d4b15aab76e5e4633b71f25f7f25baa5b9e375d373e8729205700a57de'
            'a1dd1b688f08c5c967861fe80df13cac201afa6dcfcecc9a289b2c3bec7c8915'
            '1ada993b3f079bba40be736a66eae390ee0427c18289be5965338f8e3adc7f27')
_exec=('jeditbg %U')
_name=('jEdit')
_genericname=('Editor')

build() {
  cd "$srcdir"

  gendesk -n
}

package() {
  cd "$srcdir"

  java -jar "${pkgname}${pkgver}install.jar" auto \
    "$pkgdir/usr/share/java/$pkgname/" \
    unix-script="$pkgdir/usr/bin/" \
    unix-man="$pkgdir/usr/share/man/man1" > inst.log

  install -Dm755 "jedit.sh" "$pkgdir/usr/bin/jedit"
  install -Dm755 "jeditbg.sh" "$pkgdir/usr/bin/jeditbg"
  install -Dm644 "jedit.props" "$pkgdir/usr/share/jedit/default.props"
  install -Dm644 "jedit.desktop" "$pkgdir/usr/share/applications/jedit.desktop"
  install -Dm644 "$pkgdir/usr/share/java/jedit/doc/jedit.png" \
    "$pkgdir/usr/share/pixmaps/jedit.png"
}

# vim:set ts=2 sw=2 et:
